window.alert = mobilePopupMessage;
function mobilePopupMessage(message, url) {
    $(function () {
        try {
            $('#pnlAlertModalContent p').html(message);
            $('#pnlAlertModal').modal('show');

            if (url != undefined) {
                $("#pnlAlertModal a").attr("href", url);
            }

        } catch (e) {
            delete window.alert;
            alert(message);
            window.alert = mobilePopupMessage;
        }
    });
}